package hu.arguscab.ai;

import java.util.List;

/**
 * That class could create new Nodes (for example new States) from existing Nodes (e.g. existing States).
 * It creates the new <code>Node</code>s, their <code>Edge</code>s and join them with their parents.
 * @param <E> The data type that <code>Edge</code> contain. 
 * @param <N> The data type that <code>Node</code> contain. 
 * @author sharp
 */
public abstract class NodeCreator<E, N> {

	/**
	 * How much "depth"(tick) are between two levels.
	 */
	private int depthDiff;
	
	/**
	 * Creates the Root state/Node.
	 * @return
	 */
	public abstract N createRoot();
	
	public abstract NodePair<E, N> createNode(Node<N> from, int step);
	
	/**
	 *
	 * @param from
	 * @return
	 */
	public abstract List<NodePair<E, N>> createNodes(Node<N> from);

	public abstract int calcEdgeCost( Edge<E> edge );

	public int getDepth() {
		return depthDiff;
	}

	public void setDepth(int depth) {
		this.depthDiff = depth;
	}
}
